package com.codeoss.module.res.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.codeoss.module.res.request.RelRoleMenuPageRequest;
import com.codeoss.module.res.response.RelRoleMenuPageResponse;
import com.codeoss.module.res.service.IRelRoleMenuPageService;

@Controller
@RequestMapping("relrolemenupage")
public class RelRoleMenuPageController {
	@Autowired
	private IRelRoleMenuPageService relRoleMenuPageService;
	@RequestMapping(value = "init", method = RequestMethod.GET)
	@ResponseBody
	public RelRoleMenuPageResponse init(@RequestParam("resRoleId") Long resRoleId){
		RelRoleMenuPageResponse relRoleMenuPageResponse=relRoleMenuPageService.init(resRoleId);
		return relRoleMenuPageResponse;
	}
	
	@RequestMapping(value = "dataSave", method = RequestMethod.POST)
	@ResponseBody
	public RelRoleMenuPageResponse dataSave(@RequestBody RelRoleMenuPageRequest request){
		RelRoleMenuPageResponse relRoleMenuPageResponse=relRoleMenuPageService.dataSave(request);
		return relRoleMenuPageResponse;
	}
}
